/*
 * MapLoader.h
 *
 *  Created on: May 25, 2011
 *      Author: madboyka
 */

#ifndef MAPLOADER_H_
#define MAPLOADER_H_
#include "World.h"
#include <QDomDocument>
#include <QFile>
#include <QString>
#include <QDomNodeList>
#include <QStringList>
#include "EdlParser.h"

/*!
 * Utility class, used for loading obstacles into the world from a given XML file.
 */
class MapLoader {
public:
	MapLoader();
	virtual ~MapLoader();
	/*!
	 * Loads and parses the given XML file.
	 * @return false on error, true otherwise.
	 */
	bool load(const QString);
	/*!
	 * Add the previously parsed obstacles to the given World instance.
	 * @return false on error, true otherwise.
	 */
	bool addObjects(World* world);
private:
	EdlParser *parser;
};

#endif /* MAPLOADER_H_ */
